(function() {
	document.addEventListener("DOMContentLoaded", function() {
		//英文译中文
		var curl = "https://translate.google.cn/#auto/zh-CN/";
		chrome.storage.sync.get("te_option_item", function(items) {
			if(items.te_option_item == 1) curl = "https://fanyi.baidu.com/#auto/zh/";
		});
		document.getElementById("btn").onclick = function() {
			window.open(curl + document.getElementById("src").value, "_blank");
		};
	});
})();

